package com.masterrabbit.sn.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.masterrabbit.sn.domain.Reviews;
import com.masterrabbit.sn.service.ReviewsService;
import com.masterrabbit.sn.mapper.ReviewsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author 13119
* @description 针对表【reviews】的数据库操作Service实现
* @createDate 2025-03-20 16:08:59
*/
@Service
public class ReviewsServiceImpl extends ServiceImpl<ReviewsMapper, Reviews>
    implements ReviewsService{
    @Autowired
    ReviewsMapper reviewsMapper;

    @Override
    public Page<Reviews> getReviews(int userMerchantId, int pageNo, int pageSize) {
        Page<Reviews> page = new Page<>(pageNo, pageSize);
        return reviewsMapper.getReviews(userMerchantId, page);
    }
    public Reviews getReviewsById(int reviewId) {
        return reviewsMapper.selectById(reviewId);
    }


}




